1
2#include "Heimdal.xcconfig"
3
4ASAN_PATH = /usr/local/clang-asan
5
6BUILD_VARIANTS = normal asan
7
8CC         = $(ASAN_PATH)/bin/clang
9CXX        = $(ASAN_PATH)/bin/clang++
10LDPLUSPLUS = $(ASAN_PATH)/bin/clang++
11
12// Xcode passes OTHER_LDFLAGS to libtool, which doesn't understand some of the
13// flags. The libtool-wrap.py strips these flags out. <rdar://problem/4285249>
14LIBTOOL = $(SOURCE_ROOT)/xcconfig/libtool-wrap.py
15
16// These are the default flags for enabling Address Sanitizer
17ASAN_CFLAGS			= -fsanitize=address -fno-omit-frame-pointer
18ASAN_LDFLAGS			= -fsanitize=address -Wl,-exported_symbol,___asan_mapping_offset -Wl,-exported_symbol,___asan_mapping_scale
19
20OTHER_CFLAGS_asan		= $(ASAN_CFLAGS) $(inherited)
21OTHER_CPLUSPLUSFLAGS_asan	= $(ASAN_CFLAGS) $(inherited)
22OTHER_LDFLAGS_asan		= $(ASAN_LDFLAGS) $(inherited)
23
24// Build optimized to reduce the performance impact
25GCC_OPTIMIZATION_LEVEL = 1
26
27// Do not run the static analyzer, to speed up builds
28RUN_CLANG_STATIC_ANALYZER = NO
29
30// Search for other Address Sanitizer-enabled frameworks in DSTROOT
31FRAMEWORK_SEARCH_PATHS_asan = "$(DSTROOT)/System/Library/PrivateFrameworks" "$(DSTROOT)/System/Library/Frameworks" $(inherited)
32